//
//  CollectionNormalCell.swift
//  liveDemo
//
//  Created by satoshi_uma on 2020/10/22.
//  Copyright © 2020 satoshi_uma. All rights reserved.
//

import Kingfisher
import UIKit

class CollectionNormalCell: UICollectionViewCell {
    @IBOutlet var NormalLeftLabrl: UILabel!
    @IBOutlet var NormalImage: UIImageView!
    @IBOutlet var NoemalNameLabel: UILabel!
    @IBOutlet var NormalPersonNumLabel: UIButton!

    var anchorGroup: AnchorGroup? {
        didSet {
            guard let anchor = anchorGroup else { return }
//            NormalLeftLabrl.text = anchor.title
            NoemalNameLabel.text = anchor.title

            NormalPersonNumLabel.setTitle(anchor.src, for: .normal)

            guard let imageUrl = URL(string: anchor.pic) else { return }
            NormalImage.kf.setImage(with: imageUrl)
            NormalImage.contentMode = .scaleAspectFill
        }
    }
}
